#include "stdafx.h"

struct Bar
{
    float current; // 0 to 1
    ColourValue border, empty, filled;
	Gorilla::Rectangle * frame, * progress;
    Bar()
    {
        current = 0.f;
        border = ColourValue();
        empty = ColourValue(0.5f, 0.5f, 0.5f, 0.2f);
        filled = ColourValue(0.7f, 0.7f, 0.7f, 1.0f);
    }
    void set_progress(float f) { progress->width(frame->width() * f); }
    void add_progress(float f)
    {
        current += f;
        progress -> width (frame->width() * current);
        if(current > 1.f) 
            current -= 1.f;
    }

};
